<?php require ("header.php"); ?>
<?php include ("../config/conn.php"); 
		if ($ad_check<1){
			header ("Location:../login.php?action=0");
		} 
		if ($ad_check==1) {
			echo "<br><br><br><br><br><b><br><center>You do not have privillage to register lecturers.</center></b>";
			echo "<br><br><br><br><br><b><br><br>";
			echo "<META http-equiv=\"refresh\" content=\"2;URL=admin.php?action=102\">";
		}
		else {
?>
<style type="text/css">
<!--
.style1 {
	font-size: 18px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #000000;
}
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
}
.style2 {color: #000000}
.style3 {color: #999999}
.style4 {color: #CCCCCC}
.style6 {color: #0099FF}
.style7 {
	color: #FFFFFF;
	font-weight: bold;
}
.style8 {color: #FFFFFF}
.style9 {color: #FF0000}
-->
</style>

	<?php 
		$sql="SELECT dep_name,dep_code FROM deparment ORDER BY dep_name ASC";
		$result = mysql_query($sql);
	?>
	
	<center><br /><br />
	<form name="Admin_Reg" method="POST" action="engine/ad_reg_engine.php">
	<table width="780" border="1" bordercolor="#CCCCCC" bgcolor="#CCCCCC">
  	 <tr>
 	   <td bordercolor="#CCCCCC" bgcolor="#000000"><div align="center">
 	     <p>&nbsp;</p>
 	     <p class="style1 style3">ADMINISTRATION AND LECTURERS REGISTRATION FORM </p>
 	     <table width="637" border="0">
           <tr>
             <td width="247"><span class="style4">Name </span></td>
             <td width="9"><span class="style4">:</span></td>
             <td width="367"><span class="style2">
               <input name="ad_name" type="text" id="ad_name" size="50">
             </span></td>
           </tr>
           <tr valign="top">
             <td><span class="style4">Staff Identification Number </span></td>
             <td><span class="style4">:</span></td>
             <td><span class="style2">
               <input name="ad_no" type="text" id="ad_no" size="50" /><br />
               <span class="style8"><span class="style9">*</span> This will be lecturer login id        </span></span></td>
           </tr>
           <tr>
             <td><span class="style4">Password</span></td>
             <td><span class="style4">:</span></td>
             <td><span class="style2">
               <input name="ad_password" type="password" id="ad_password" size="30">
             </span></td>
           </tr>
           <tr>
             <td><span class="style4">Deparment</span></td>
             <td><span class="style4">:</span></td>
             <td><span class="style2">
               <select name="ad_department" id="ad_department">
			     <option value=""></option>
			   <?php while ($row = mysql_fetch_assoc($result)) { ?>
                 <option value="<?php echo $row['dep_code']; ?>"><?php echo $row['dep_name']; ?></option>
			   <?php } ?>
               </select>
             </span></td>
           </tr>
           <tr>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
           </tr>
           <tr>
             <td colspan="3"><hr /></td>
            </tr>
           <tr>
             <td colspan="3"><div align="justify"><span class="style6">Set admin permission. <span class="style7">Super User</span> 
               will have permission to add other lecturer's account while <span class="style7">Lecturers</span> 
              can only add Question and Notes. This setting is important to limit admin privilleges. </span></div></td>
            </tr>
           <tr>
             <td><span class="style4">User permission</span> </td>
             <td><span class="style4">:</span></td>
             <td>
               <input name="ad_permission" type="radio" value="1" />
              <span class="style4">             Super User 
              <input name="ad_permission" type="radio" value="0" />
              Lecturers</span></td>
           </tr>
         </table>
 	     <p>&nbsp;</p>
 	     <p>
 	       <input type="submit" name="Submit" value="Submit"> &nbsp;&nbsp;
 	        <input type="reset" name="Submit2" value="Reset">
 	     </p>
 	     <p>&nbsp;</p>
 	   </div></td>
 	 </tr>
	</table>
	<?php echo "<br><br></center>"; }
	require ("../footer.php");
?>
</form>
	
